//
//  WX2DCodeView.m
//  PlayCatchGame
//
//  Created by 流言 on 2018/2/5.
//  Copyright © 2018年 清正. All rights reserved.
//

#import "WX2DCodeView.h"

@interface WX2DCodeView ()

@property (nonatomic, copy)ViewBlock longPressBlock;
@property (nonatomic, copy)ButtonBlock copyBlock;


@end

@implementation WX2DCodeView


- (IBAction)longPressClick:(UILongPressGestureRecognizer *)sender {
    if (sender.state ==UIGestureRecognizerStateBegan) {
        if (self.longPressBlock) {
            self.longPressBlock(sender.view);
        }
    }
}
/// 长按回调
- (void)longPressGestureRecognizerBlock:(ViewBlock)newBlock {
    self.longPressBlock = newBlock;
}


- (IBAction)copyButtonClick:(UIButton *)sender {
    if (self.copyBlock) {
        self.copyBlock(sender);
    }
}
/// 复制按钮
- (void)copyButtonBlock:(ButtonBlock)newBlock {
    self.copyBlock = newBlock;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
